@extends('layout.admin')
@section("content")

    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <div class="panel-body">
            <form role="form" method="post" action="/admin/lesson/save">
                <div class="row">
                    <div class="col-md-2"><label class="control-label">课程名称:</label></div>
                    <div class="col-md-4">
                        <input type="text" name="name" value="<?php echo isset($lesson->name)?$lesson->name:'';?>" class="form-control" placeholder="课程名称">
                    </div>
                </div>

                <br/>
                <div class="row">
                    <div class="col-md-2"><label class="control-label">课程内容:</label></div>
                    <div class="col-md-4">
                        <textarea class="form-control" rows="6" placeholder="课程内容" name="content">
                            <?php echo isset($lesson->content) ? $lesson->content : '';?>
                        </textarea>
                    </div>
                </div>

                <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
                <input type="hidden" name="id" value="<?php echo isset($lesson->id)?$lesson->id:0;?>">
                <div class="row" style="text-align: center;margin-top: 10px;">
                    <button type="submit" class="btn btn-primary btn-lg">保存</button>
                </div>
            </form>
        </div>
    </div>

@endsection
